<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        let user={
            id:1000,
            name:'苏鹏',
            age:20,
            like:'吃饭睡觉打豆豆'
        }
        function objToString12(obj) {
            let result = '{';
            for (const key in obj) {
                if (obj.hasOwnProperty(key)) {
                    result += `"${obj[key]}"`;
                }
            }
            return result;
        }
        let str = objToString12(user);
        console.log(str); // 输出转换后的字符串
        console.log(Math.floor(Math.random()*(200-42+1))+42);
        console.log(Math.floor(Math.random()*(-12-(-100)+1))+(-100));
        console.log(Math.ceil(33.3333));
        console.log(Math.floor(33.3333));
    </script>
</body>
</html>